package com.example.sysao.service.impl;

import com.example.sysao.mapper.AdminMapper;
import com.example.sysao.pejo.Admin;
import com.example.sysao.service.AdminService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class AdminServiceImp implements AdminService {
    @Resource
    private AdminMapper adminMapper;

    //登录
    @Override
    public Admin findByIsandPwd(int id) {
        return adminMapper.selectByIdAdPwd(id);
    }

    @Override
    public Admin findById(int id) {
        return adminMapper.selectById(id);
    }

    @Override
    public boolean saveAdmin(Admin admin) {
        return adminMapper.updateadmin(admin) != 0;
    }
}
